#include "dialog.h"
#include <QApplication>
#include <QSettings>

int main(int argc, char *argv[])
{

    QApplication a(argc, argv);

    QTranslator translator;
    QSettings *config_ini = new QSettings("config.ini", QSettings::IniFormat, 0); ////参数iniformat是针对ini文件的意思
//    config_ini->setValue("language", "en");
   QString language = config_ini->value("language").toString();
 //  QMessageBox::information(NULL, "language", language );

    delete config_ini;
   if(language == "en")
   {

       translator.load("english.qm", qApp->applicationDirPath());
        a.installTranslator(&translator);
   }


    Dialog w;
    w.showMaximized();

   return a.exec();
}
